// ------------------------------
// edX Web Certificates: Certificate Rendering - Print Specific Styling

// About: (specifically for certificate rendering) styling specific for print layouts.

// #LAYOUT
// #ELEMENTS
// #CASES

// ------------------------------
// #LAYOUT
// ------------------------------
@media print {

  .accomplishment-rendering {
    @include text-align(left);
    top: 0 !important;
    box-shadow: none;
    border: none;
    padding: spacing-vertical(x-small) spacing-horizontal(large);
    background-color: palette(grayscale, white-t);

    .wrapper-accomplishment-title {

      .accomplishment-title {
        display: inline-block;
        vertical-align: middle;
        width: span(8 of 12);
        margin-top: spacing-vertical(x-small);
        margin-bottom: 0;
      }
    }

    .wrapper-accomplishment-orgs {
      display: inline-block;
      vertical-align: middle;
      width: span(4 of 12);
      margin-top: spacing-vertical(base);
      margin-bottom: spacing-vertical(base);

      img {
        max-width: 100%;
        max-height: 100px;
      }
    }

    .accomplishment-statement {
      @include text-align(left);
      display: inline-block;
      vertical-align: top;
      width: span(8 of 12);
      margin-top: spacing-vertical(mid-large);
      border-bottom: 0;
    }

    .accomplishment-signatories {
      @include margin-left(gutter(inside));
      @include text-align(right);
      display: inline-block;
      vertical-align: top;
      width: span(4 of 12);
      border-bottom: 0;
      padding-bottom: 0;
    }

    .signatory {
      @include gallery(12 of 12);
      float: none;
      margin: 0;
      margin-bottom: spacing-vertical(x-small);

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .wrapper-accomplishment-stamps {
    margin-top: 0;
  }

  .accomplishment-stamps {
    margin-top: 0;

    .accomplishment-stamp-platform {
      display: inline-block;
      vertical-align: top;
      @include margin-right(25px);
      margin-bottom: 0;
      padding-top: 0;

      // FIXME This is edx.org-specific and belongs in a themed stylesheet in credentials-themes
      svg.edx-logo {
        width: 70px;
        height: 32.4px;
      }
    }

    .accomplishment-stamp-date {
      display: inline-block;
      vertical-align: top;
      @include margin-right(25px);
    }

    .accomplishment-stamp-validity {
      display: inline-block;
      vertical-align: top;
      @include margin-right(25px);
    }

    .accomplishment-stamp-effort {
      display: inline-block;
      vertical-align: top;
    }
  }
}

// ------------------------------
// #ELEMENTS
// ------------------------------
@media print {

  // accomplishment
  .wrapper-accomplishment-statement {

    .accomplishment-recipient {
      @extend .hd-2;
    }

    .accomplishment-course, .accomplishment-program {
      @extend .hd-3;
    }

    .copy {
      @extend .copy-meta;
      color: $text-de-emphasized-color;
    }

    .accomplishment-recipient,
    .accomplishment-course,
    .accomplishment-program,
    .accomplishment-summary,
    .accomplishment-statement-detail {
      margin: 0 0 spacing-vertical(small) 0;
    }
  }

  .signatory {

    .signatory-signature {
      max-width: 50%;
      height: 40px;
    }

    .signatory-name,
    .signatory-credentials {
      margin-bottom: 2px;
      font-size: font-size(xxx-small);
      line-height: line-height(xxx-small);
    }
  }

  .accomplishment-stamps {

    .title {
      font-size: font-size(xxx-small);
      line-height: line-height(xxx-small);
    }

    .emphasized {
      font-weight: normal;
      font-size: font-size(xxx-small);
      line-height: line-height(xxx-small);
    }
  }
}
